How to get the browser to navigate to a URL in JavaScript

196

How to get the browser to navigate to a URL in JavaScript -

//This works in all browsers:

window.location.href = '...';

/*If you wanted to change the page without it reflecting in the browser back
history, you can do:*/
window.location.replace('...');

Comments

Submit
0 Comments